import axios from '@/api/fetch';
import SERVER from '@/api/server';

//厂端获取经销商账户信息
export const getAccount = params => axios.get(`${SERVER.CMSCLOUD_WMS}/part/dealerAccountCapital`, { params });
//店厂端根据经销商信息查流水
export const findCashFlow = params => axios.post(`${SERVER.CMSCLOUD_WMS}/part/dealerAccountCapital/findCashFlow`,  params );
//店厂端根据经销商信息查冻结金额
export const findCashFrozenFlow = params => axios.post(`${SERVER.CMSCLOUD_WMS}/part/dealerAccountCapital/findCashFrozenFlow`,  params );
//店端查询账户信息
export const dealerGetAccount = params => axios.get(`${SERVER.CMSCLOUD_WMS}/part/dealerAccountCapital/dealerGetAccount`, { params });
//店端打款审核查询
export const dealerRemitInfo = params => axios.get(`${SERVER.CMSCLOUD_WMS}/part/dealerAccountCapital/dealerRemitInfo`, { params });
//店端打款审核保存或提交
export const auditAdd = params => axios.post(`${SERVER.CMSCLOUD_WMS}/part/dealerAccountCapital/paymentAuditAdd`,  params );
//厂端打款审核查询
export const oemRemitInfo = params => axios.get(`${SERVER.CMSCLOUD_WMS}/part/dealerAccountCapital/oemRemitInfo`, { params });
//厂端审核提交
export const auditCommit = params => axios.post(`${SERVER.CMSCLOUD_WMS}/part/dealerAccountCapital/auditCommit`,  params );
//根据私有照片文件地址得到临时访问下载地址
export const findFileByUrl = params => axios.post(`/api/file/download/url?fileUrl=`+ params );
//厂端调账新增或编辑
export const addOrEditBill = params => axios.post(`${SERVER.CMSCLOUD_WMS}/part/dealerAccountCapital/addOrEditBill`,  params );
//厂端查询调账信息
export const selectBill = params => axios.get(`${SERVER.CMSCLOUD_WMS}/part/dealerAccountCapital/selectBill`, { params });
//厂端过账
export const factoryPosting = params => axios.post(`${SERVER.CMSCLOUD_WMS}/part/dealerAccountCapital/factoryPosting`,  params );
//厂端删除过账
export const delBill = params => axios.post(`${SERVER.CMSCLOUD_WMS}/part/dealerAccountCapital/delBill`,  params );
//厂端打款审核查询
export const findDealerInfo = params => axios.get(`${SERVER.CMSCLOUD_WMS}/channel/dealerInfoFind`, { params });
//服务商账户资金明细导出
export const detailExport = params => axios.get(`${SERVER.CMSCLOUD_WMS}/part/dealerAccountCapital/detailExport`, {
    params,
    responseType: 'blob'
  });



